package com.hspedu.homework;

/**
 * @author DL5O
 * @version 1.0
 */
public class Homework08 {
    public static void main(String[] args) {
      Color[] color = Color.values();
        for (Color color1 : color) {
            switch (color1.name()){
                case "RED":
                    System.out.print("红色:");
                    color1.show();
                    break;
                case "BLUE":
                    System.out.print("蓝色:");
                    color1.show();
                    break;
                case "BLACK":
                    System.out.print("黑色:");
                    color1.show();
                    break;
                case "YELLOW":
                    System.out.print("黄色:");
                    color1.show();
                    break;
                case "GREEN":
                    System.out.print("绿色:");
                    color1.show();
                    break;
            }
        }
    }
}


interface IA{
    void show();
}

enum Color implements IA{
    RED(255,0,0),BLUE(0,0,255),
    BLACK(0,0,0),YELLOW(255,255,0),
    GREEN(0,255,0);
    private int readValue;
    private int greenValue;
    private int blueValue;

    private Color(int readValue, int greenValue, int blueValue) {
        this.readValue = readValue;
        this.greenValue = greenValue;
        this.blueValue = blueValue;
    }

    @Override
    public void show() {
        System.out.println("("+readValue +"," +greenValue +","+blueValue + ")");
    }
}
